package com.hzvtc.bosswang.manageuser.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hzvtc.bosswang.manageuser.domain.Grade;
import com.hzvtc.bosswang.manageuser.mapper.GradeMapper;
import com.hzvtc.bosswang.manageuser.service.GradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GradeServiceImpl implements GradeService{

    @Autowired
    private GradeMapper gradeMapper;

    @Override
    public Integer addGrade(Grade grade) {
        return gradeMapper.add(grade);
    }

    @Override
    public Integer editGrade(Grade grade) {
        return gradeMapper.edit(grade);
    }

    @Override
    public Integer deleteGrade(Long id) {
        return gradeMapper.delete(id);
    }

    @Override
    public Grade selectGradeById(Long id) {
        return gradeMapper.selectGradeById(id);
    }

    @Override
    public Page<Grade> listGrade(Page<Grade> page, Grade grade) {

        return gradeMapper.selectGradeList(page,grade);
    }
}
